﻿namespace In66.Net.Share.Filters
{
    public class ApiAuthorizeFilter : IAuthorizationFilter
    {
        public void OnAuthorization(AuthorizationFilterContext context)
        {
            if (context.ActionDescriptor.EndpointMetadata.Any(item => item is IAllowAnonymous))
            {
                //果如只加了[AllowAnonymous]没有加[FixedToken]标签的,就直接绕后任何权限,表示可以直接访问的接口
                return;

            }
        }
    }
}